Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify decimal regex to accept positive exponent specifier #5649

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

jdcasale
Copy link
Contributor

Which issue does this PR close?

Closes #5648

Rationale for this change

If users have float data in scientific format with a positive exponent specifier (e.g "3.106e+04"), the current csv inference mechanism does not work correctly. This change fixes that.

What changes are included in this PR?

Are there any user-facing changes?

This causes a change in schema inference behavior -- it's possible that some user relies on the fact that the current behavior is incorrect. I'm not sure what arrow's policy is around visible changes like this, so if this is change is not allowable I understand.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Apr 15, 2024
@tustvold
Copy link
Contributor

Could we get a test or two for this please

@jdcasale
Copy link
Contributor Author

jdcasale commented Apr 15, 2024

Sure -- will add some test coverage

@jdcasale
Copy link
Contributor Author

@tustvold I've added a test asserting correctness of the result of inferring a schema on float data that includes scientific notation data. (with both positive and negative exponents)

I modeled it on adjacent tests so I don't think the test itself is likely to be controversial, but this is my first-time committing to this repository so please do let me know if there's anything else you'd like to see on this.

@tustvold tustvold merged commit 34e2ac2 into apache:master Apr 16, 2024
22 checks passed
@tustvold
Copy link
Contributor

Thank you, looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DECIMAL regex in csv reader does not accept positive exponent specifier
2 participants